﻿@{
    ViewBag.Title = "Form";
    Layout = "~/Views/Shared/_LayoutIndex.cshtml";
}
<script>
    var IsAudit = "@LeSoft.Application.Bussiness.WorkRoleSettingBLL.GetIsAudit(Convert.ToInt32(LeSoft.Application.Code.WorkRoleEnum.QuaFirst))";
    var keyValue = request('keyValue');
    var Id = "", State = "";
    var RoomList1 = [], RoomList2 = [], RoomList3 = [], File = [];
   
    $(function () { 
        InitialPage();
        InitControl();
        TranslateInfoState();
    });
    //初始化数据
    function InitControl() {
        if (!!keyValue) {
            $.SetForm({
                url: "../../QualificationManage/FirstTrial/GetBillInfo",
                param: { keyValue: keyValue },
                success: function (data) { 
                    Id = data.BillInfo.Id;
                    State = data.BillInfo.State;
                    $("#SubmitCount").text(data.BillInfo.SubmitCount == 0 ? 1 : data.BillInfo.SubmitCount);
                    $("#State").text(GetState(data.BillInfo.State));
                    $("#Category").text(GetCategory(data.BillInfo.Category));
                    $("#QualificationBill").SetWebControls(data.BillInfo);
                    debugger;
                    var cultural = "";
                    switch (data.MemberInfo.Cultural) {
                        case "0": cultural = "博士"; break;
                        case "1": cultural = "硕士"; break;
                        case "2": cultural = "本科"; break;
                        case "3": cultural = "大专、高职"; break;
                        case "4": cultural = "高中"; break;
                        case "5": cultural = "中专、职校"; break;
                        case "6": cultural = "初中"; break;
                        case "7": cultural = "小学"; break;
                        default: cultural = data.MemberInfo.Cultural; break;
                    }
                    data.MemberInfo.Cultural = cultural;
                    var companytype = "";
                    switch (data.MemberInfo.CompanyType) {
                        case "-1": companytype = "其他"; break;
                        case "0": companytype = "机关单位"; break;
                        case "1": companytype = "事业单位"; break;
                        case "2": companytype = "国有企业"; break;
                        case "3": companytype = "集体企业"; break;
                        case "4": companytype = "外资企业"; break;
                        case "5": companytype = "合资企业"; break;
                        case "6": companytype = "私营企业"; break;
                        case "7": companytype = "港澳合企业"; break;
                        case "8": companytype = "社会团体"; break;
                        case "9": companytype = "个体工商户"; break;
                        case "10": companytype = "非正规就业劳动组织"; break;
                        default: companytype = data.MemberInfo.CompanyType; break;
                    }
                    data.MemberInfo.CompanyType = companytype;

                    $("#SQRXX").SetWebControls(data.MemberInfo);
                    $("#Address").val(data.BillInfo.Address);
                    $("#PostalCode").val(data.BillInfo.PostalCode)
                    GetGrid1(data.ResidentList);
                    GetRommListByCategory(data.RoomList)
                    GetGrid2(RoomList2);
                    GetGrid3(RoomList3);
                    GetGrid4(RoomList1);
                    GetGrid5(data.CheckRecordList); 
                    TranslateInfoState();
                    GetAccessory(data.FileList);
                    if (State >= 3) {
                        $("#AuditState").attr("hidden", "hidden");
                    }
                    if (State < 3) {
                        $("#AuditState").removeAttr("hidden");
                    }
                    $("#MarryInfo").val(GetMarryInfoText($("#MarryInfo").val()));
                    GetGridA(data.CheckRecordList);
                    var SignType = "";
                    switch (data.BillInfo.SignType) {
                        //   1- 单位 2-个人
                        case 1: SignType = "单位";
                            break;
                        case 2: SignType = "个人";
                            break;
                        default:
                    }
                    $("#SignType").text(SignType);
                    var FamilyType = "";
                    switch (data.BillInfo.FamilyType) {
                        case 1: FamilyType = "单身";
                            break;
                        case 2: FamilyType = "大龄青年";
                            break;
                        case 3: FamilyType = "家庭";
                            break;
                        default:
                    }
                    $("#FamilyType").text(FamilyType);
                }
            })
        }


    }
    //初始化页面
    function InitialPage() {
        //layout布局
        $('#layout').layout({
            applyDemoStyles: true,
            onresize: function () {
                $(window).resize()
            }
        });
        $('.profile-content').height($(window).height() - 20);
        $('.profile-nav').height($(window).height() - 20);
    }
    //侧面切换显示/隐藏
    function profileSwitch(id) {
        if (id == "BillContent") {
            $("#TrialRecord").hide();
            $("#TrialLog").hide();
            $("#BillContent").show();
        } else if (id == "TrialLog") {
            $("#TrialRecord").hide();
            $("#BillContent").hide();
            $("#TrialLog").show();
            getOperateGrid();
        }
        else {
            $("#BillContent").hide();
            $("#TrialLog").hide();
            $("#TrialRecord").show();
          

        }
    };
    //共同申请人信息
    function GetGrid1(data) {
        var selectedRowIndex = 0;
        $gridTable = $("#gridTable1");
        $gridTable.jqGrid({
            datatype: "json",
            height: 110,
            autowidth: true,
            colModel: [
                { label: "主键", name: "Id", hidden: true },
                { label: "姓名", name: "Name", index: "Name", width: 200, align: "center", sortable: false },
                {
                    label: "性别", name: "Sex", index: "Sex", width: 200, align: "center", sortable: false,
                    formatter: function (cellvalue) {
                        switch (cellvalue) {
                            case "1":
                            case 1: return "男";
                            case "2":
                            case 2: return "女";
                            default: return cellvalue;

                        }
                    }
                },
                { label: "身份证号码", name: "IDCard", index: "IDCard", width: 200, align: "center", sortable: false },
                {
                    label: "与申请人关系", name: "Relation", index: "Relation", width: 200, align: "center", sortable: false,
                    formatter: function (cellvalue) {
                        switch (cellvalue) {
                            case "0": return "配偶";
                            case "1": return "子女";                           
                            default: return cellvalue;
                        }

                    }
                },
                {
                    label: "本市常住人口", name: "IsPermanent", index: "IsPermanent", width: 200, align: "center", sortable: false,
                    formatter: function (cellvalue) {
                        switch (cellvalue) {
                            case 1:
                            case "1": return "是";
                            case 0:
                            case "0": return "否";
                            default: return "---";

                        }

                    }
                },
                {
                    label: "婚姻状况", name: "MarryInfo", index: "MarryInfo", width: 200, align: "center", sortable: false,
                    formatter: function (cellvalue) {
                        switch (cellvalue) {
                            case "1": return "未婚";
                            case "2": return "已婚";                           
                            case "3": return "离异";
                            case "4": return "丧偶";
                            default: return cellvalue;
                        }

                    }
                }
            ],
            viewrecords: true,
            rowNum: 30,
            rowList: [30, 50, 100],
            pager: "#gridPager",
            sortname: 'Date',
            sortorder: 'desc',
            rownumbers: true,
            gridview: true,
            onSelectRow: function (status) {
                selectedRowIndex = $("#" + this.id).getGridParam('selrow');
            },
            gridComplete: function () {
                $("#" + this.id).setSelection(selectedRowIndex, false);
            },
        });
        $gridTable[0].addJSONData(data);

    };
    //申请人本市户籍地住房情况
    function GetGrid2(data) {
        var selectedRowIndex = 0;
        $gridTable = $("#gridTable2");
        $gridTable.jqGrid({
            datatype: "json",
            autowidth: true,
            height: 150,
            colModel: [
                { label: "主键", name: "Id", hidden: true },
                { label: "房屋坐落地址", name: "Address", index: "Address", width: 500, align: "center", sortable: false },
                { label: "建筑面积", name: "Area", index: "Area", width: 200, align: "center", sortable: false },
                { label: "使用面积", name: "UseArea", index: "UseArea", width: 200, align: "center", sortable: false },
                { label: "产权人或公房承租人", name: "Owner", index: "Owner", width: 200, align: "center", sortable: false },
                { label: "该住房户籍人口总数", name: "PeopleCount", index: "PeopleCount", width: 200, align: "center", sortable: false },
                {
                    label: "产权类型", name: "Category", index: "Category", width: 200, align: "center", sortable: false,
                    formatter: function (cellvalue, options, rowObject) {
                        var Msg = "";
                        switch (cellvalue) {
                            case 1: Msg = "公有住房";
                                break;
                            case 2: Msg = "本市户籍地住房";
                                break;
                            case 3: Msg = "本市产权房";
                                break;
                            default: Msg = "---";
                                break;
                        }
                        return Msg;
                    }
                },
                {
                    label: "房屋类型", name: "RoomType", index: "RoomType", width: 200, align: "center", sortable: false,
                    formatter: function (cellvalue, options, rowObject) {
                        var Msg = "";
                        switch (cellvalue) {
                            case "0": Msg = "老式公寓";
                                break;
                            case "1": Msg = "花园住宅";
                                break;
                            case "2": Msg = "新里";
                                break;
                            case "3": Msg = "高层";
                                break;
                            case "4": Msg = "多层（成套）";
                                break;
                            case "5": Msg = "多层（不成套）";
                                break;
                            case "6": Msg = "旧里及改居";
                                break;
                            case "7": Msg = "筒屋";
                                break;
                            case "8": Msg = "“两万户”新工房";
                                break;
                            case "9": Msg = "其他";
                                break;                           
                            default: Msg = cellvalue;
                                break;
                        }
                        return Msg;
                    }
                },

            ],
            viewrecords: true,
            rowNum: 30,
            rowList: [30, 50, 100],
            pager: "#gridPager",
            sortname: 'Date',
            sortorder: 'desc',
            rownumbers: true,
            gridview: true,
            onSelectRow: function (status) {
                selectedRowIndex = $("#" + this.id).getGridParam('selrow');
            },
            gridComplete: function () {
                $("#" + this.id).setSelection(selectedRowIndex, false);
            }
        });
        $gridTable[0].addJSONData(data);

    };
    //申请人拥有本市产权住房情况
    function GetGrid3(data) {
        var selectedRowIndex = 0;
        $gridTable = $("#gridTable3");
        $gridTable.jqGrid({
            datatype: "json",
            height: 150,
            autowidth: true,
            colModel: [
                { label: "主键", name: "Id", hidden: true },
                { label: "房屋坐落地址", name: "Address", index: "Address", width: 500, align: "center", sortable: false },
                { label: "建筑面积", name: "Area", index: "Area", width: 200, align: "center", sortable: false },
                { label: "产权人", name: "Owner", index: "Owner", width: 200, align: "center", sortable: false },
                { label: "该住房户籍人口总数", name: "PeopleCount", index: "PeopleCount", width: 200, align: "center", sortable: false },
            ],
            viewrecords: true,
            rowNum: 30,
            rowList: [30, 50, 100],
            pager: "#gridPager",
            sortname: 'Date',
            sortorder: 'desc',
            rownumbers: true,
            gridview: true,
            onSelectRow: function (status) {
                selectedRowIndex = $("#" + this.id).getGridParam('selrow');
            },
            gridComplete: function () {
                $("#" + this.id).setSelection(selectedRowIndex, false);
            }
        });
        $gridTable[0].addJSONData(data);

    };
    //申请人承租本市共有住房情况
    function GetGrid4(data) {
        var selectedRowIndex = 0;
        $gridTable = $("#gridTable4");
        $gridTable.jqGrid({
            datatype: "json",
            height: 150,
            autowidth: true,
            colModel: [
                { label: "主键", name: "Id", hidden: true },
                { label: "房屋坐落地址", name: "Address", index: "Address", width: 500, align: "center", sortable: false },
                { label: "建筑面积", name: "Area", index: "Area", width: 200, align: "center", sortable: false },
                { label: "使用面积", name: "UseArea", index: "UseArea", width: 200, align: "center", sortable: false },
                { label: "产权人或公房承租人", name: "Owner", index: "Owner", width: 200, align: "center", sortable: false },
                { label: "该住房户籍人口总数", name: "PeopleCount", index: "PeopleCount", width: 200, align: "center", sortable: false },
                {
                    label: "产权性质", name: "Category", index: "Category", width: 200, align: "center", sortable: false,
                    formatter: function (cellvalue, options, rowObject) {
                        var Msg = "";
                        switch (cellvalue) {
                            case 1: Msg = "公有住房";
                                break;
                            case 2: Msg = "本市户籍地住房";
                                break;
                            case 3: Msg = "本市产权房";
                                break;
                            default: Msg = "---";
                                break;
                        }
                        return Msg;
                    }
                },
                {
                    label: "房屋类型", name: "RoomType", index: "RoomType", width: 200, align: "center", sortable: false,
                    formatter: function (cellvalue, options, rowObject) {
                        var Msg = "";
                        switch (cellvalue) {
                            case "0": Msg = "老式公寓";
                                break;
                            case "1": Msg = "花园住宅";
                                break;
                            case "2": Msg = "新里";
                                break;
                            case "3": Msg = "高层";
                                break;
                            case "4": Msg = "多层（成套）";
                                break;
                            case "5": Msg = "多层（不成套）";
                                break;
                            case "6": Msg = "旧里及改居";
                                break;
                            case "7": Msg = "筒屋";
                                break;
                            case "8": Msg = "“两万户”新工房";
                                break;
                            case "9": Msg = "其他";
                                break;
                            default: Msg = cellvalue;
                                break;
                        }
                        return Msg;
                    }
                },
            ],
            viewrecords: true,
            rowNum: 30,
            rowList: [30, 50, 100],
            pager: "#gridPager",
            sortname: 'Date',
            sortorder: 'desc',
            rownumbers: true,
            gridview: true,
            onSelectRow: function (status) {
                selectedRowIndex = $("#" + this.id).getGridParam('selrow');
            },
            gridComplete: function () {
                $("#" + this.id).setSelection(selectedRowIndex, false);
            }
        });
        $gridTable[0].addJSONData(data);

    };
    //审核记录
    function GetGrid5(data) {
        var selectedRowIndex = 0;
        $gridTable = $("#gridTable5");
        $gridTable.jqGrid({
            datatype: "json",
            height: $(window).height() - 141,
            autowidth: true,
            colModel: [
                  { label: "主键", name: "Id", hidden: true },
                  {
                      label: "操作类别", name: "Type", index: "Type", width: 200, align: "center", sortable: false,
                      formatter: function (cellvalue) {
                          switch (cellvalue) {
                              case 1:
                              case "1":
                                  return "初审";
                              case 2:
                              case "3":
                                  return "材料提交";
                              case 3:
                              case "3":
                                  return "市局审批";
                              case 4:
                              case "4":
                                  return "复审";
                              default:

                          }
                      }
                  },
                  { label: "审核人", name: "CheckMan", index: "CheckMan", width: 200, align: "center", sortable: false },
                  { label: "审核时间", name: "CheckDate", index: "CheckDate", width: 200, align: "center", sortable: false },
                  {
                      label: "审核结果", name: "CheckFlag", index: "CheckFlag", width: 300, align: "center", sortable: false,
                      formatter: function (cellvalue, options, rowObject) {
                          var Msg = "<span  class='label' style='background-color:";
                          if (rowObject.Type == 1) {
                              if (cellvalue == 0) {
                                  Msg += "#B05B5C'>" + "初审未通过"
                              }
                              else {
                                  Msg += "#BCD186'>" + "初审通过"
                              }
                          }
                          if (rowObject.Type == 2) {
                              if (cellvalue == 0) {
                                  Msg += "#839B27'>" + "材料未通过"
                              }
                              else {
                                  Msg += "#81B981'>" + "材料通过"
                              }
                          }
                          if (rowObject.Type == 3) {
                              if (cellvalue == 0) {
                                  Msg += "#F09005'>" + "市局审批未通过"
                              }
                              else {
                                  Msg += "#5CB85C'>" + "市局审批通过"
                              }
                          }
                          if (rowObject.Type == 4) {
                              if (cellvalue == 0) {
                                  Msg += "#f00'>" + "复审未通过"
                              }
                              else {
                                  Msg += "#5CB85C'>" + "复审通过"

                              }
                          }
                          Msg += "</span>";
                          return Msg;
                      }
                  },
                  { label: "审核说明", name: "CheckMemo", index: "CheckMemo", width: 650, align: "center", sortable: false },
            ],
            viewrecords: true,
            rowNum: 300,
            sortname: 'CheckDate',
            sortorder: 'asc',
            rownumbers: true,
            gridview: true,
            onSelectRow: function (status) {
                selectedRowIndex = $("#" + this.id).getGridParam('selrow');
            },
            gridComplete: function () {
                $("#" + this.id).setSelection(selectedRowIndex, false);
            }
        });
        $gridTable[0].addJSONData(data);

    };
   
    //操作记录
    function getOperateGrid() {
        $gridTable = $("#gridTable6"); 
        $gridTable.jqGrid({
            url: "../../SystemManage/Setting/GetOperateRecordList",
            postData: { BillId: Id },
            datatype: "json",
            height: $(window).height() - 141,
            autowidth: true,
            colModel: [
               { label: '项目主键', name: 'Id', hidden: true },
                        { label: '业务类别', name: 'Type', width: 100, align: 'center', sortable: false },
                        { label: '操作人', name: 'FromOperateName', width: 100, align: 'center', sortable: false },
                        { label: '操作时间', name: 'Date', width: 170, align: 'center', sortable: false },
                        {
                            label: "操作内容", name: "Content", index: "Content", width: 590, align: "left", sortable: false,
                            formatter: function (cellvalue, options, rowObject) {
                                if (!!rowObject.ToOperateName)
                                    return "发起者：" + rowObject.FromOperateName + "，接受者：" + rowObject.ToOperateName + "<br/>" + cellvalue;
                                else
                                    return "发起者：" + rowObject.FromOperateName + "<br/>" + cellvalue;
                            }
                        },
            ],
            viewrecords: true,
            rowNum: 300,
            rownumbers: true,
            gridview: true,

        });
    }


    //转换审批状态
    function GetState(value) {
        var Msg = "";
        switch (value) {
            case 1: Msg = "初审中";
                break;
            case 2: Msg = "初审中";
                break;
            case 3: Msg = "初审未通过";
                break;
            case 4:
            case 5:
            case 6:
            case 7:
            case 8:
            case 9:
            case 10: Msg = "初审通过";
                break;
            default: Msg = value;
                break;
        }
        return Msg;
    };
    function GetCategory(s) {

        var Msg = "";
        switch (s) {
            case 1: Msg = "初次申请";
                break;
            case 2: Msg = "再次申请";
                break;
            case 3: Msg = "续租申请";
                break;
            case 4: Msg = "再次续租申请";
                break;
            default: Msg = s;
                break;
        }
        return Msg;
    }
    //提交
    function Submit(S) {
        if (IsAudit == "False") {
            dialogMsg('您没有该权限！', 0);
            return false;
        }
        if (!$('#Audit').Validform()) {
            return false;
        }
        State = S;
        if (State === "") {
            dialogMsg('未选择审核结果！', 0);
            return false;
        }
        else {
            var Memo = $("#Memo").val();
            if (S == 0 && Memo === "") {
                dialogMsg('请说明不同意原因！', 0);
                return false;
            } 
            $.ConfirmAjax({
                msg: "注：您确认要进行此操作吗？",
                url: "../../QualificationManage/FirstTrial/SubmitForm",
                param: { keyValue: Id, Memo: Memo, State: State },
                loading: "正在保存数据...",
                success: function () {
                    location.reload();
                }
            });
           
        }

    };
    //分类房屋情况
    function GetRommListByCategory(list) {

        var Data = [];
        Data = list;
        for (var i = 0; i < Data.length; i++) {
            if (Data[i].Category == 1) {
                RoomList1.push(Data[i]);
            }
            if (Data[i].Category == 2) {
                RoomList2.push(Data[i]);
            }
            if (Data[i].Category == 3) {
                RoomList3.push(Data[i]);
            }
        }
    };
    //装换信息状态
    function TranslateInfoState() {
        if ($("#Sex").val() == 1 || $("#Sex").val() == "1") {
            $("#Sex").val("男");
        }
        if ($("#Sex").val() == 2 || $("#Sex").val() == "2") {
            $("#Sex").val("女");
        }
        $(".IsState").each(function () {

            if ($(this).val() == 1 || $(this).val() == "1") {
                $(this).val("是");
            }
            if ($(this).val() == 0 || $(this).val() == "0") {
                $(this).val("否");
            }

        })

    };
    //获取附件信息
    function GetAccessory(data) {
        File = data;
        var html1 = "";
        var html2 = "";
        debugger;
        for (var i = 0; i < File.length; i++) {
            switch (File[i].FileType) {
                case 0:
                case 1: //图片
                    html1 += "<div class='CS_C'ondblclick='GetAccess(\"" +encodeURI( File[i].FileUrl) + "\");'><div class=CS_T><img src='" + File[i].FileUrl + "'alt='加载失败' /></div><div class='CS_D'>" + File[i].FileName + "</div></div>"

                    break;
                default: break;

            }

        }
        $("#CS_IO").html(html1);
    }
    //查看及下载附件
    function GetAccess(Url) {
        var a;
        a = window.open(Url, "_blank", "width=1500, height=1000,status=0");

    };
    function GetMarryInfoText(s) {
        switch (s) {
            case 1:
            case "1":
                return "未婚";
            case 2:
            case "2":
                return "已婚";
            case 3:
            case "3":
                return "离婚";
            case 4:
            case "4":
                return "丧偶";
            default:
                return s;

        }

    }

    function GetGridA(data) {
        var $gridTable = $("#gridTableA");
        $gridTable.jqGrid({
            datatype: "json",
            height: 80,
            autowidth: true,
            unwritten: false,
            colModel: [
              { label: "主键", name: "Id", hidden: true },

              { label: "审核人", name: "CheckMan", index: "CheckMan", width: 300, align: "center", sortable: false },
              { label: "审核时间", name: "CheckDate", index: "CheckDate", width: 300, align: "center", sortable: false },
              {
                  label: "审核结果", name: "CheckFlag", index: "CheckFlag", width: 300, align: "center", sortable: false,
                  formatter: function (cellvalue, options, rowObject) {
                      var Msg = "";
                      if (rowObject.Type == 1) {
                          if (cellvalue == 0) {
                              Msg += "初审未通过"
                          }
                          else {
                              Msg += "初审通过"
                          }
                      }
                      if (rowObject.Type == 2) {
                          if (cellvalue == 0) {
                              Msg += "材料未通过"
                          }
                          else {
                              Msg += "材料通过"
                          }
                      }
                      if (rowObject.Type == 3) {
                          if (cellvalue == 0) {
                              Msg += "市局审批未通过"
                          }
                          else {
                              Msg += "市局审批通过"
                          }
                      }
                      if (rowObject.Type == 4) {
                          if (cellvalue == 0) {
                              Msg += "复审未通过"
                          }
                          else {
                              Msg += "复审通过"

                          }
                      }
                      return Msg;
                  }
              },
              { label: "审核说明", name: "CheckMemo", index: "CheckMemo", width: 650, align: "center", sortable: false },
            ],
            viewrecords: true,
            rowNum: 300,
            sortname: 'CheckDate',
            sortorder: 'asc',
            gridview: true,
        });
        var arr = $.grep(data, function (value) {
            return value.Type == 1;
        })
        $gridTable[0].addJSONData(arr);

    }

    
</script>

<style>
    #SQRXX {
        border: 1px solid #ccc;
    }

        #SQRXX td {
            border: 1px solid #ccc;
        }



    .CS_C {
        margin: 10px;
        width: 140px;
        height: 100px;
        border: solid 1px #F0F0F0;
        margin: 10px;
        float: left;
    }

        .CS_C:hover {
            border: solid 1px #AFD4FA;
            background-color: #F5FAFF;
        }

    .CS_T {
        width: 140px;
        height: 70px;
        line-height: 30px;
        text-align: center;
    }

        .CS_T img {
            width: 100px;
            height: 60px;
        }

    .CS_D {
        width: 140px;
        text-align: center;
    }

    .Cs_1 {
        background-color: #F5F5F5;
        width: 150px;
        text-align: center;
        font-size: 12px;
        height: 30px;
    }

    .Cs_2 {
        text-align: center;
    }

    .form-control {
        border: none;
    }
</style>
<div class="ui-layout" id="layout" style="height: 100%;  width: 100%;">
    <div class="ui-layout-west">
        <div class="west-Panel">
            <div class="profile-nav">
                <ul style="padding-top: 20px;">
                    <li class="active" onclick="profileSwitch('BillContent')">单据内容</li>
                    <li onclick="profileSwitch('TrialRecord')">审核记录</li>
                    <li onclick="profileSwitch('TrialLog')">单据日志</li>
                </ul>
            </div>
        </div>
    </div>
    <div class="ui-layout-center">
        <div class="center-Panel">
            <div class="profile-content" style="background: #fff; ">
                <div id="BillContent">
                    <table class="form" id="QualificationBill" style="margin-top: 20px;">
                        <tr>
                            <td class="formTitle">单据编号：</td>
                            <td class="formValue"><input class="form-control" readonly id="Code" type="text" /></td>
                            <td class="formTitle">创建时间：</td>
                            <td class="formValue"><input class="form-control" readonly id="CreateDate" type="text" /></td>
                            <td class="formTitle">提交时间：</td>
                            <td class="formValue"><input class="form-control" readonly id="Date" type="text" /></td>
                            <td class="formTitle">第<span id="SubmitCount" style="color:red;font-size:24px;"></span>次提交</td>
                            <td></td>
                        </tr>
                        <tr>
                            <td class="formTitle">初审状态：</td>
                            <td class="formValue">
                                <span style="color:red;font-size:18px;" id="State"></span>
                            </td>
                            <td>家庭类型：</td>
                            <td class="formValue">
                                <span style="color:red;font-size:18px;" id="FamilyType"></span>
                            </td>
                            <td>申请类型：</td>
                            <td class="formValue">
                                <span style="color:red;font-size:18px;" id="SignType"></span>
                            </td>
                            <td class="formTitle">业务类型：</td>
                            <td class="formValue">
                                <span style="color:red;font-size:18px;" id="Category"></span>
                            </td>
                        </tr>
                        <tr style=" height: 20px; border-bottom: 1px dashed #cecece;"><td colspan="8"></td> </tr>
                        <tr style="height:10px;"></tr>
                        <tr><td colspan="7"><h4>申请人信息</h4></td></tr>
                    </table>
                    <table class="form" id="SQRXX" style="margin-top: 20px;">
                        <tr>
                            <td class=" Cs_1">姓名</td>
                            <td class="formValue"><input class="form-control" readonly id="Name" type="text" /></td>
                            <td class=" Cs_1">身份证号</td>
                            <td class="formValue"><input class="form-control" readonly id="IDCard" type="text" /></td>
                            <td class=" Cs_1">性别</td>
                            <td class="formValue"><input class="form-control" readonly id="Sex" type="text" /></td>
                            <td class=" Cs_1">民族</td>
                            <td class="formValue"><input class="form-control" readonly id="Nation" type="text" /></td>
                        </tr>
                        <tr>
                            <td class=" Cs_1">文化程度</td>
                            <td class="formValue"><input class="form-control" readonly id="Cultural" type="text" /></td>
                            <td class=" Cs_1">手机号码</td>
                            <td class="formValue"><input class="form-control" readonly id="Phone" type="text" /></td>
                            <td class=" Cs_1">固定电话</td>
                            <td class="formValue"><input class="form-control" readonly id="PhoneNum" type="text" /></td>
                            <td class=" Cs_1">婚姻状况</td>
                            <td class="formValue"><input class="form-control" readonly id="MarryInfo" type="text" /></td>
                        </tr>
                        <tr>
                            <td class=" Cs_1">户籍所在地</td>
                            <td class="formValue" colspan="7"><input class="form-control" readonly id="HouseholdAddress" type="text" /></td>
                            @*<td class=" Cs_1">户籍地邮编</td>
                                <td class="formValue"><input class="form-control" readonly id="HouseholdPostalCode" type="text" /></td>*@

                        </tr>
                        <tr>
                            <td class=" Cs_1">通讯地址</td>
                            <td class="formValue" colspan="5"><input class="form-control" readonly id="Address" type="text" /></td>
                            <td class=" Cs_1">通讯邮编</td>
                            <td class="formValue"><input class="form-control" readonly id="PostalCode" type="text" /></td>
                        </tr>
                        <tr>
                            <td class=" Cs_1">是否办理本市居住证</td>
                            <td class="formValue"><input class="form-control IsState" readonly id="HasLiveCard" type="text" /></td>
                            <td class=" Cs_1">居住证号码</td>
                            <td class="formValue"><input class="form-control" readonly id="LiveCard" type="text" /></td>
                            <td class=" Cs_1">持证是否满两年</td>
                            <td class="formValue"><input class="form-control IsState" readonly id="LiveCardFull2Year" type="text" /></td>
                            <td class=" Cs_1">是否缴纳社保金</td>
                            <td class="formValue"><input class="form-control IsState" readonly id="HasSocialSecurityFund" type="text" /></td>
                        </tr>
                        <tr>
                            <td class=" Cs_1">连续缴金是否满一年</td>
                            <td class="formValue"><input class="form-control IsState" readonly id="SocialsecurityFullYear" type="text" /></td>
                            <td class=" Cs_1">是否缴纳本市公积金</td>
                            <td class="formValue"><input class="form-control IsState" readonly id="HasProvidentFund" type="text" /></td>
                            <td class=" Cs_1">公积金账号</td>
                            <td class="formValue" colspan="3"><input class="form-control" readonly id="ProvidentFundCard" type="text" /></td>
                        </tr>
                        <tr>
                            <td class=" Cs_1">单位名称</td>
                            <td class="formValue" colspan="3"><input class="form-control" readonly id="CompanyName" type="text" /></td>
                            <td class=" Cs_1">单位电话</td>
                            <td class="formValue"><input class="form-control" readonly id="CompanyPhone" type="text" /></td>
                            <td class=" Cs_1">单位类别</td>
                            <td class="formValue"><input class="form-control" readonly id="CompanyType" type="text" /></td>
                        </tr>
                        <tr>
                            <td class=" Cs_1">单位地址</td>
                            <td class="formValue" colspan="5"><input class="form-control" readonly id="CompanyAddress" type="text" /></td>
                            <td class=" Cs_1">单位邮编</td>
                            <td class="formValue"><input class="form-control" readonly id="CompanyPostalCode" type="text" /></td>
                        </tr>
                    </table>
                    <br />
                    <h4>共同申请人信息</h4><br />
                    <div class="center-Panel">
                        <div class="gridPanel">
                            <table id="gridTable1"></table>
                        </div>
                    </div>
                    <br /> <h4>申请人本市户籍地住房情况</h4>
                    <div class="center-Panel">
                        <div class="gridPanel">
                            <table id="gridTable2"></table>
                        </div>
                    </div>
                    <br /> <h4>申请人拥有本市产权住房情况</h4>
                    <div class="center-Panel">
                        <div class="gridPanel">
                            <table id="gridTable3"></table>
                        </div>
                    </div>
                    <br /> <h4>申请人承租本市共有住房情况</h4>
                    <div class="center-Panel">
                        <div class="gridPanel">
                            <table id="gridTable4"></table>
                        </div>
                    </div>
                    <br /><h4>附件</h4><br />
                    <table class="form">
                        <tr style="height:110px;"><td id="CS_IO" colspan="6"></td></tr>
                        <tr style=" height: 20px; border-bottom: 1px dashed #cecece;"><td colspan="6"></td> </tr>
                        <tr style="height:10px;"></tr>

                    </table>
                    <table class="form" id="Audit" style="background-color: #F5f5f5;">

                        <tr>
                            <td colspan="7">
                                <div class="center-Panel">
                                    <div class="gridPanel">
                                        <table id="gridTableA"></table>
                                    </div>
                                </div>
                            </td>
                        </tr>
                        <tr id="AuditState">
                            <td class="formTitle" style="text-align:right;">审批意见：</td>
                            <td class="formValue" colspan="3"><input id="Memo" class="form-control" type="text" isvalid="yes" checkexpession="IsScript" /></td>
                            <td class="formValue">
                                <a id="lr-addRule" class="btn btn-success btn-xs" style="width:150px;height:28px; margin-left:30px;" onclick="Submit(1); "><i class="fa fa-plus"></i>&nbsp;同意</a>
                            </td>
                            <td class="formValue">
                                <a id="lr-deleteRule" class="btn btn-danger btn-xs" style="width: 150px; height: 28px;" onclick="Submit(0); "><i class="fa fa-trash-o"></i>&nbsp;不同意</a>
                            </td>
                            <td></td>
                        </tr>
                    </table>
                    <div style="height:50px;"></div>
                </div>
                <div id="TrialRecord" style="display: none;">
                    <div class="title">
                        审核记录
                    </div>

                    <div class="gridPanel">
                        <table id="gridTable5"></table>
                        <div id="gridPager5"></div>
                    </div>
                </div>
                <div id="TrialLog" style="display: none;">
                    <div class="title">
                        操作日志
                    </div>

                    <div class="gridPanel">
                        <table id="gridTable6"></table>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>


